//var httpAdress ="http://www2.viphk.ngrok.org";
//var httpAdress ="http://192.168.1.177:81/";
var httpAdress ="http://new.yytaomeng.com";
//var httpAdress ="http://192.168.1.11:80";
var refresh=document.getElementById('refresh');
/*var arr=['../../HTML/home/home.html', '../../HTML/daikuan/daikuan.html', '../../HTML/bank/credit_card.html', '../../HTML/login/login.html'];
var muitabitem=document.getElementsByClassName('mui-tab-item');
for(var i=0;i<4;i++){
	muitabitem[i].addEventListener('tap'function(){
		document.location.href=arr[i];
		this.className('mui-tab-item mui-tab-item1 mui-active');
	})
}*/
function GetQueryString(key) {
		// key为url变量名称
		var urlGets = location.search.substr(1);
		if(urlGets.length > 0) {
			start = urlGets.indexOf(key + '=');
			if(start != -1) {
				start = start + key.length + 1;
				end = urlGets.indexOf('&', start)
				if(end == -1) {
					end = urlGets.length
				}
				return decodeURIComponent(urlGets.substring(start, end))
			}
		}
		return '';
	}
/*
var userup = localStorage.getItem('userid');
var arrqq = ['./../../HTML/home/home.html', '../../HTML/daikuan/daikuan_new.html', '../../HTML/bank/credit_card.html', '../../HTML/login/login.html'];
function tabclick(){
var muitabitem = document.getElementsByClassName('mui-tab-item');	
for(var i = 0; i < 4; i++) {
	muitabitem[i].addEventListener('tap', function() {
		for(var j = 0; j < 4; j++) {
			if(this == muitabitem[j]) {
			window.location.href = arrqq[j]+'?v='+Math.random();
//				mui.openWindow({
//					url: arrqq[j]
//				})
//              alert(arrqq[j]);
				if(j == 3 && userup !== null) {
					mui.openWindow({
							url: '../../HTML/my/my.html?v='+Math.random()
						})
						//								document.location.href = '../../HTML/my/my.html';
				}
			}
		}
	});
}
}*/

//小数转分数
Number.prototype.toPercent = function(n) {
	n = n || 0;
	return(Math.round(this * Math.pow(10, n + 2)) / Math.pow(10, n)).toFixed(n) + '%';
}
//分享图片
$('<div style="margin:0 auto;width:0px;height:0px;overflow:hidden;">'+
				'<img src="../../img/sharepic.png" width="700">'+
			'</div>').prependTo($('.mui-content'))
//分享标题
document.getElementsByTagName('title')[0].innerHTML='JKW-您的贷款借款利器';


